<?php
namespace app\common\validate;

use think\Validate;

class Manage extends Validate
{
	protected $rule = [
			'admin_name|登录账号' => ['require','max' => 10],
			'admin_pwd|登录密码' => ['require','max' => 10 ,'min' => 6,'alphaDash'],
			'admin_real|真实姓名' => ['require','max' => 5],
			'admin_mobile|手机号码' => ['require', 'number','gt' => 10],
			'admin_limit|权限' => ['require','gt' => 0],
	];
	protected $message = [
			'admin_name.max' => '登录账号不能超过10位',
			'admin_pwd.max' => '登录密码不能超10位',
			'admin_pwd.min' => '登录密码不能小于6位',
			'admin_pwd.alphaDash' => '登录密码只能是数字、字母组合',
			'admin_real.max' => '真实姓名不能超过5位',
			'admin_mobile.number' => '手机号码不合法',
			'admin_mobile.eq' => '手机号码不合法',
			'admin_limit.gt' => '请选择权限'
	];
	protected $scene = [
			'add'=>['admin_name','admin_pwd','admin_real','admin_mobile','admin_limit'],
			'update' => ['admin_name','admin_real','admin_mobile','admin_limit']
	];
}